﻿using LmgCMS.Service;
using Quartz.Impl;
using static Quartz.Logging.OperationName;

namespace LmgCMS
{
    public static class QuartzConfigureServices
    {
        public static void AddQuartzService(this IServiceCollection services)
        {
            var scheduler = StdSchedulerFactory.GetDefaultScheduler().GetAwaiter().GetResult();
            services.AddSingleton(scheduler);
            services.AddHostedService<QuartzService>();
        }
    }
}
